
CC = cc
AR = ar
RM = -rm -f
CPPFLAGS = -Iinclude

SLIB = libsll.a
DLIB = libdll.a
LIBDIR = lib

all:
	@echo "Usage:type 'make lib' to generate new libs."
	@echo "Usage:type 'make cleanlib' to remove the existing ones."

.PHONY : lib clean
lib:
	$(CC) $(CPPFLAGS) -c sll.c
	$(AR) rs $(SLIB) sll.o
	$(CC) $(CPPFLAGS) -c dll.c
	$(AR) rs $(DLIB) dll.o
	-mkdir $(LIBDIR)
	-mv -vf *.a $(LIBDIR)

clean:
	$(RM) *.o

cleanlib:
	$(RM) -R $(LIBDIR)

